<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Register</title>

	<style type="text/css">
body {
	margin-top: 10%;
	margin-right: 30%; 
	margin-left: 30%; 
	border: 2px solid black;
}
</style>
</h:head>
<h:body>
	<h:form>
		  <p:panel header="Enter your personal information:">
				<h:panelGrid>
					<p:messages id="messages" autoUpdate="true" closable="true"
						showDetail="true" />

					<h:panelGrid columns="2">
						<p:outputLabel for="login" value="Login" />
						<p:inputText id="login" value="#{registerBean.login}" />

						<p:outputLabel for="pwd" value="Password" />
						<p:password id="pwd" value="#{registerBean.password}" />

						<p:outputLabel for="congirm" value="Confirm" />
						<p:password id="congirm" value="#{registerBean.confirm}" />

						<p:outputLabel for="name" value="Name" />
						<p:inputText id="name" value="#{registerBean.name}" />

						<p:outputLabel for="surname" value="Surname" />
						<p:inputText id="surname" value="#{registerBean.surname}" />


						<p:outputLabel for="birthday" value="Birthday" />
						<p:calendar id="birthday" navigator="true"
							value="#{registerBean.birthday}" />


					</h:panelGrid>

					<h:panelGroup>
						<p:commandButton value="Register"
							action="#{registerBean.register}" />
						<p:commandButton value="Cancel" action="login?faces-redirect=true"
							immediate="true" />
					</h:panelGroup>
				</h:panelGrid>
			</p:panel>
	</h:form>
</h:body>
</html>